home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / util2 / zgrep30.zip / ZGREP.TXT < prev   
Text File  |  1993-01-08  |  8KB  |  238 lines

  1.                            ZGREP version 3.0
  2.                                    by
  3.                            Douglas E. MacLean
  4.                          2200 Ocean Ave. Apt 6B
  5.                         Brooklyn, New York 11229
  6.  
  7.  
  8.     How many times did you ever want to search through a directory full
  9. of ZIP files but you couldn't exactly remember the name of the file you
  10. wanted?  With ZGrep you can bring the power of Unix style regular
  11. expressions to assist in your search.  Or perhaps you would like to
  12. only unzip a series of files with certain characters in the name. 
  13. ZGrep is just the utility to use.
  14.  
  15. Regular expressions are search patterns were certain special character
  16. are expanded to limit and guide the search.  ZGrep uses these regular
  17. expressions to search ZIP and self extracting EXE files for exactly the
  18. files you want.  The zip program is limited to the use of DOS wildcards
  19. to perform its operations.  Now with ZGrep you can expand the
  20. usefulness of this powerful tool.
  21.  
  22. The use of Zgrep is very easy.  People familiar with the uniz grep
  23. program will be abile to use it right away.  The command line is as
  24. follows.
  25.  
  26.         zgrep <-flags> regexp<,regexp...>|#refile <zipfile{.zip|.exe}|@filelist
  27.  
  28. Where flags are the various options to produce different style
  29. listings, regexp are the regular expression and filelist is the list of
  30. files to search.  Multiple regular expressions are separated by a
  31. comma.
  32.  
  33. The options are:
  34.  
  35. usage:zgrep [-<lzfinv021hau:path] regexp|#refile <zipfile[.zip|.exe]|@listfile...>
  36.  
  37. -l:         full listing
  38. -z:         list only zip file name
  39. -f:         list only file name
  40. -i:         list only files/zips that do not match
  41. -v:         verbose mode: show stats
  42. -0:         check for version 0.92 exe files
  43. -1:         check for version 1.02 exe files
  44. -2:         check for version 1.10 exe files
  45. -h:         help with regular expressions
  46. -n:         the name of zip and matching files
  47. -u<path>    unzip files to path, use '.' for current dir
  48. -a:         ask before unzipping file
  49.  
  50. @listfile may be used to specify a list of files to search
  51. #refile may contain a list of regular expressions to use
  52. zgrep returns an errorlevel of 0 if files are found
  53.                            and 1 if no files are located
  54.  
  55.  
  56.  
  57.         -l  full listing
  58.  
  59. This option provides the full path of the zip file where the match
  60. occurred.  The time, date and size of the original files are also
  61. displayed.  This is the default mode.
  62.  
  63.         -z  zip files only
  64.  
  65. This options only displays the name of the zip files that contain
  66. matches for the regular expression.
  67.  
  68.         -f  files only
  69.  
  70. This will list the names of the files that match.  On information about
  71. which zip file are displayed.
  72.  
  73.         -i  inverse match
  74.  
  75. This will invert the selection displaying only those files that don't
  76. match the regular expression.
  77.  
  78.         -n  name list mode
  79.  
  80. This will provide the name of the zip file and the file that matches
  81. the selection criteria.
  82.  
  83.         -v  verbose mode
  84.  
  85. This will display additional information such as the date, time and
  86. size of the matching files.  
  87.  
  88.         -0  PKZ092 mode (self extraction)
  89.  
  90. This options permits ZGrep to work on self extracting exe files created
  91. by PKZip versions prior to the 1.0x versions.
  92.  
  93. Self extracting exe files from versions 1.10 is the default setting.
  94.  
  95.         -1  PKZ102 mode (self extraction)
  96.  
  97. This options permits ZGrep to work on self extracting exe files created
  98. by PKZip versions 1.01 and 1.02
  99.  
  100.         -2  PKZ110 mode (self extraction)
  101.  
  102. This options permits ZGrep to work on self extracting exe files created
  103. by PKZip versions 1.10
  104.  
  105. Self extracting exe files from versions 2.0c is the default setting.
  106.  
  107.         -h  help display
  108.  
  109. This will display a chart of the options for ZGrep.
  110.  
  111.         -u<path>    unzip located files
  112.  
  113. This will unzip the located files to the specified path.  The path
  114. should appear directly after the u and may include a drive.
  115.  
  116.             zgrep   -ud:\work   ^[A-D]  *.*
  117.  
  118. Will unzip all files that begin with the letter A through D to the D
  119. drives work directory.
  120.  
  121.         -a      ask first
  122.  
  123. This option will prompt you for a 'y' or 'n' to determine if the
  124. displayed file show be unzipped.
  125.  
  126.  
  127. With version 2.0 you can now specify the files to search in a file.
  128. The file must be proceeded by the character '@' such as:
  129.  
  130.         zgrep ^[A-D],TXT$ @filelist
  131.  
  132. You can use any combination of wildcards, filelists and filenames to
  133. designate the search list:
  134.  
  135.         zgrep ^[A-D],TXT$ zippy.zip @filelist a:programs
  136.  
  137. Notice that if the extent zip is not specified it is assumed.
  138.  
  139. With version 2.1 there is also the ability to obtain the regular expressions
  140. from a file.  The file must be preceeded by the character '#':
  141.  
  142.         zgrep #express.lst  @files
  143.  
  144. The expression file and search file should have one entry per line.  There
  145. may be mulitple search files but only one expression file.
  146.  
  147. With version 3.0 errorlevel accessible return codes may be used in
  148. batch files.  If a file is found the errorlevel is set to 0.  If no
  149. files are located, a 1 is returned.
  150.  
  151.  
  152. You can select your own defaults by setting the DOS environment variable ZGREP.
  153. For example,
  154.  
  155.             set ZGREP=nv
  156.  
  157. Will default to a verbose listing of zip and file names.
  158.  
  159. You can also use zgrep to extract files from different zip files:
  160.  
  161.             zgrep -u. EXE$,DOC$ a:v9n04.zip d:\zipfiles\list73a.zip
  162.  
  163. This command will extract to the current directory all *.DOC and *.EXE files
  164. from the listed zip files.
  165.  
  166.                             History
  167.  
  168.  * 
  169.  *    Rev 3.0   08 Jan 1993 16:19:24   Doug MacLean
  170.  * Added return of errorlevel on exit
  171.  * Updated for PKZip v2.0c Self-Extracting EXE files
  172.  * 
  173.  *    Rev 2.3   02 Jul 1991 12:46:56   DEM
  174.  * Rearranged code to increase speed
  175.  * Moved code from main function to increase optimization
  176.  * 
  177.  *    Rev 2.2   19 May 1990 12:05:26   DEM
  178.  * Modified for MSC v6.0 usage
  179.  * 
  180.  *    Rev 2.1   17 Mar 1990 17:44:15   DEM
  181.  * Added ability to obtain regular expressions from a file.
  182.  *
  183.  *    Rev 2.0   16 Mar 1990 20:23:00   DEM
  184.  * Added ability to use a list file to designate search files.
  185.  * Corrected error encounted when file specified does not exist
  186.  * Thanks to John McNamara or Mac's Place BBS (919) 891-1111
  187.  * who sugested the filelist idea.
  188.  *
  189.  *    Rev 1.6   14 Mar 1990 09:38:00   DEM
  190.  * The filename extent now defulats to ZIP if none is provided.
  191.  * You can use a command like
  192.  *          zgrep ^ZGREP  a:programs
  193.  * to refer to a:programs.zip
  194.  * 
  195.  *    Rev 1.5   23 Mar 1990 10:04:32   DEM
  196.  * Added code to support PKZ110 new EXE format.
  197.  * 
  198.  *    Rev 1.4   01 Mar 1990 15:47:16   DEM
  199.  * Removed code that can be supplied from personal library
  200.  * Removed redundant external prototyping
  201.  * Added version number in usage display
  202.  * 
  203.  *    Rev 1.3   02 Feb 1990 17:18:24   DEM
  204.  * Corrected code to permit multiple option flags
  205.  * Added environmental defaults
  206.  * First offical public release
  207.  * 
  208.  *    Rev 1.2   02 Feb 1990 13:29:50   DEM
  209.  * Added code to unzip located files to given path
  210.  * Added call to getopt()
  211.  * 
  212.  *    Rev 1.1   31 Jan 1990 22:32:52   DEM
  213.  * Added online help for regular expressions
  214.  * 
  215.  *    Rev 1.0   31 Jan 1990 16:20:10   DEM
  216.  * Initial revision.
  217. */
  218.  
  219. If you find this program useful, please register.  The cost is $15. 
  220. This includes full support, the next release and a sampler pack of
  221. other Unix4DOS programs that I am sure you will find useful.
  222.  
  223. The author may be contacted via the following RIME conferences:
  224.  
  225.         'C' Programming
  226.         Object Oriented Programming
  227.         ASM Programming
  228.         Brief Editor Support
  229.         Biology Conference
  230.         IDC (TCXL) Support
  231.         Systems Design
  232.         Boyan Support
  233.         Cancer Support
  234.  
  235. "I host all of the above!"
  236.  
  237. Thanks in advance for your support.
  238.